DynamicSprite description ...


Properties


ColorDepth

Gets the colour depth of this dynamic sprite.


Graphic

int Graphic

Gets the sprite slot number in which this dynamic sprite is stored.


Height

int Height

Gets the height of this dynamic sprite.


Width

int Width

Gets the width of this dynamic sprite.


Methods


ChangeCanvasSize

Changes the sprite size to width x height, placing the current image at offset(x, y) within the new canvas.Unlike the Resize command, the current image is kept at its original size.


CopyTransparencyMask

Copies the transparency mask from the specified sprite slot onto the dynamic sprite.The dynamic sprite's transparency and/or alpha channel will be replaced with the one from the other sprite.


Create

static DynamicSprite Create(int width, int height, bool hasAlphaChannel)

Creates a blank dynamic sprite of the specified size.


CreateFromBackground

Creates a dynamic sprite as a copy of a room background.


CreateFromDrawingSurface

static DynamicSprite CreateFromDrawingSurface(DrawingSurface surface, int x, int y, int width, int height)

Creates a dynamic sprite as a copy of a drawing surface.


CreateFromExistingSprite

static DynamicSprite CreateFromExistingSprite(int slot, bool preserveAlphaChannel)

Creates a dynamic sprite as a copy of an existing sprite.


CreateFromFile

static DynamicSprite CreateFromFile(string filename)

Creates a dynamic sprite from a BMP or PNG file.


CreateFromSaveGame

Creates a dynamic sprite from a save game screenshot.


CreateFromScreenShot

Creates a dynamic sprite as a copy of the current screen.


Crop

Crops the sprite down to width x height, starting from(x, y) in the image.


Delete

void Delete()

Deletes the specified dynamic sprite from memory.Use this when you are no longer displaying the sprite and it can be safely disposed of.


Flip

Flips the dynamic sprite according to the parameter


GetDrawingSurface

DrawingSurface GetDrawingSurface(bool storeOnCPU)

Gets the drawing surface for this dynamic sprite, which allows you to modify the sprite by drawing onto it in various ways.


Resize

Resizes an existing dynamic sprite to WIDTH x HEIGHT pixels.


Rotate

Rotates the dynamic sprite by the specified angle.The angle is in degrees, and must lie between 1 and 359. The image will be rotated clockwise by the specified angle.


SaveToFile

Saves the dynamic sprite to the specified file.


Tint

Tints the dynamic sprite to(RED, GREEN, BLUE) with SATURATION percent saturation.